package com.kata.chapter16;

/**
 * 喽啰阶层
 * Created by Solidsnake on 2015/4/19.
 */
public class Leaf implements ITree{

    private ITree parent;

    private String name;
    private String position;
    private int age;

    @Override
    public void work() {
        System.out.println("生活在公司底层的 ["+ this.position +"] [" + this.name +"] 正在顶着领导的唾沫星子卯足了劲的干活儿");
    }

    @Override
    public void setParent(ITree parent) {
        this.parent = parent;
    }

    @Override
    public ITree getParent() {
        return parent;
    }

    public Leaf(String name, String position, int age) {
        this.name = name;
        this.position = position;
        this.age = age;
    }
}
